3.288 \(\int \frac {a+b x^n}{c+d x^n} \, dx\)

Optimal. Leaf size=43 \[ \frac {b x}{d}-\frac {x (b c-a d) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{c d} \]

[Out]

b*x/d-(-a*d+b*c)*x*hypergeom([1, 1/n],[1+1/n],-d*x^n/c)/c/d

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {388, 245} \[ \frac {b x}{d}-\frac {x (b c-a d) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{c d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)/(c + d*x^n),x]

[Out]

(b*x)/d - ((b*c - a*d)*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)])/(c*d)

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rubi steps

\begin {align*} \int \frac {a+b x^n}{c+d x^n} \, dx &=\frac {b x}{d}-\frac {(b c-a d) \int \frac {1}{c+d x^n} \, dx}{d}\\ &=\frac {b x}{d}-\frac {(b c-a d) x \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )}{c d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 40, normalized size = 0.93 \[ \frac {x \left ((a d-b c) \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\frac {d x^n}{c}\right )+b c\right )}{c d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)/(c + d*x^n),x]

[Out]

(x*(b*c + (-(b*c) + a*d)*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), -((d*x^n)/c)]))/(c*d)

________________________________________________________________________________________

fricas [F]  time = 0.67, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {b x^{n} + a}{d x^{n} + c}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/(c+d*x^n),x, algorithm="fricas")

[Out]

integral((b*x^n + a)/(d*x^n + c), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {b x^{n} + a}{d x^{n} + c}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/(c+d*x^n),x, algorithm="giac")

[Out]

integrate((b*x^n + a)/(d*x^n + c), x)

________________________________________________________________________________________

maple [F]  time = 0.63, size = 0, normalized size = 0.00 \[ \int \frac {b \,x^{n}+a}{d \,x^{n}+c}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x^n+a)/(c+d*x^n),x)

[Out]

int((b*x^n+a)/(c+d*x^n),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -{\left (b c - a d\right )} \int \frac {1}{d^{2} x^{n} + c d}\,{d x} + \frac {b x}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/(c+d*x^n),x, algorithm="maxima")

[Out]

-(b*c - a*d)*integrate(1/(d^2*x^n + c*d), x) + b*x/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {a+b\,x^n}{c+d\,x^n} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)/(c + d*x^n),x)

[Out]

int((a + b*x^n)/(c + d*x^n), x)

________________________________________________________________________________________

sympy [C]  time = 3.33, size = 73, normalized size = 1.70 \[ \frac {a x \Phi \left (\frac {d x^{n} e^{i \pi }}{c}, 1, \frac {1}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{c n^{2} \Gamma \left (1 + \frac {1}{n}\right )} - \frac {b x \Phi \left (\frac {c x^{- n} e^{i \pi }}{d}, 1, \frac {e^{i \pi }}{n}\right ) \Gamma \left (\frac {1}{n}\right )}{d n^{2} \Gamma \left (1 + \frac {1}{n}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)/(c+d*x**n),x)

[Out]

a*x*lerchphi(d*x**n*exp_polar(I*pi)/c, 1, 1/n)*gamma(1/n)/(c*n**2*gamma(1 + 1/n)) - b*x*lerchphi(c*x**(-n)*exp
_polar(I*pi)/d, 1, exp_polar(I*pi)/n)*gamma(1/n)/(d*n**2*gamma(1 + 1/n))

________________________________________________________________________________________